@extends('layouts.app')

@section('title','CreateActivities')

@section('content')
<div class="container">
        <div class="row">
            <div class="col-md-12">
                <a class="create-return" href="{{route('activity.index')}}">
                    <span><i class="fa fa-chevron-circle-left fa-2x" aria-hidden="true"></i></span>
                    <span>返回</span>
                </a>
                 <div class="create">
                    <div class="create-title">添加活动</div>
                        {!! Form::open(['route' => 'activity.store', 'files' => true]) !!}
                                {{ csrf_field() }}
                        <div class="create-list{{ $errors->has('activity_name')?'has-error':'' }}">
                            {!! Form::label('activity_name','活动名称:')!!}
                            {!! Form::text('activity_name',null)!!}
                            @if ($errors->has('activity_name'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('activity_name') }}</strong>
                                </span>
                            @endif
                        </div>
                        <div class="create-list{{ $errors->has('activity_place')?'has-error':'' }}">
                            {!! Form::label('activity_place','活动地址:')!!}
                            {!! Form::text('activity_place',null) !!}
                            @if ($errors->has('activity_place'))
                                <div class="help-block">
                                    <strong>{{ $errors->first('activity_place') }}</strong>
                                </div>
                            @endif
                        </div>
                        <div class="create-list{{ $errors->has('activity_date')?'has-error':'' }}">
                        {!! Form::label('activity_date','活动时间:') !!}
                            {!! Form::text('activity_date',null) !!}
                            @if ($errors->has('activity_date'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('activity_date') }}</strong>
                                </span>
                            @endif
                        </div>
                        <div class="create-list{{ $errors->has('activity_charge')?'has-error':'' }}">
                            {!! Form::label('activity_charge','活动收费:') !!}
                            {!! Form::text('activity_charge',null) !!}
                            @if ($errors->has('activity_charge'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('activity_charge') }}</strong>
                                </span>
                            @endif
                        </div>
                        <div class="create-list{{ $errors->has('enrollments')?'has-error':'' }}">
                            {!! Form::label('enrollments','参加人数:') !!}
                            {!! Form::text('enrollments',null) !!}
                            @if ($errors->has('enrollments'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('enrollments') }}</strong>
                                </span>
                            @endif
                        </div>
                        <div class="create-list">
                            {!! Form::label('activity_picture','活动图片')!!}
                            {!! Form::file('activity_picture') !!}
                            @if ($errors->has('activity_picture'))
                                <div class="help-block">
                                    <strong>{{ $errors->first('activity_picture') }}</strong>
                                </div>
                            @endif
                        </div>
                        <div class="create-list{{ $errors->has('activity_phone')?'has-error':'' }}">
                            {!! Form::label('activity_phone','活动电话') !!}
                            {!! Form::text('activity_phone',null) !!}
                            @if ($errors->has('activity_phone'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('activity_phone') }}</strong>
                                </span>
                            @endif
                        </div>
                        <div class="create-list{{ $errors->has('activity_intro')?'has-error':'' }}">
                            {!! Form::label('activity_intro','活动简介:') !!}
                            {!! Form::textarea('activity_intro',null,['class'=>'form-control']) !!}
                            @if ($errors->has('activity_intro'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('activity_intro') }}</strong>
                                </span>
                            @endif
                        </div>
                        {!! Form::submit('添加活动',['class'=>"btn btn-success"]); !!}
                        {!! Form::close() !!}  
                        </div>
                    </div>          
                </div>
                <div id="debug"></div>
        </div>
</div>

@endsection